<include file="Public:header" />
<div class="page-member subpage">
    <div class="form-header">
        <div>
            <div class="line1">
                <div class="fl"><h3>政务内容 / 新增</h3></div>
                <div class="fr hidden">
                    <form class="search-form" method="post" action="">
                        <span>查询条件:</span>
                        <input name="field" value="{$filter.field}" type="text" />
                        <input name="value" value="{$filter.value}" type="text" />
                        <input name="page" value="{$filter.page}" type="hidden" />
                        <input name="order_field" value="{$filter.order_field}" type="hidden" />
                        <input name="order_sort" value="{$filter.order_sort}" type="hidden" />
                        <button class="btn-normal" type="submit">查 询</button>
                    </form>
                </div>
            </div>
            <div class="line2">
                <div class="fl form-btn-group">
                    <in name="$x|default='03-01-08'" value="$rightsCode">
                        <button onclick="submitForm();" class="btn-save btn-highlight">保 存</button>
                        <else />
                        <button disabled="disabled" class="btn-save btn-disable">保 存</button>
                    </in>
                    <span>或</span>
                    <a class="linkBtn btn-abort" href="/admin/affairs/index">放弃</a>
                </div>
            </div>
        </div>
    </div>
    <div class="form-box2">
        <div>
            <form id="affairsForm" method="post" action="">
                <input type="hidden" name="id" id="id" value="{$affairs.id}" />
                <table class="form">
                    <tr>
                        <th width="10%">标题<span class="hint">*</span></th>
                        <td width="40%"><input name="title" type="text" value="{$affairs.title}" /> </td>
                        <th width="10%">作者</th>
                        <td><input name="author" type="text" value="{$affairs.author|default='县房产局'}" /> </td>
                    </tr>
                    <tr>
                        <th>分类<span class="hint">*</span></th>
                        <td>
                            <select name="category">
                                <option value="0">-- 请选择分类 --</option>
                                <volist name="category" id="vo">
                                    <if condition="$vo[id] eq $affairs[category]">
                                        <option selected="selected" value="{$vo.id}">{$vo.name}</option>
                                        <else />
                                        <option value="{$vo.id}">{$vo.name}</option>
                                    </if>
                                </volist>
                            </select>
                        </td>
                        <th>序号</th>
                        <td><input name="seq" placeholder="序号越小，优先级越高" type="text" value="{$affairs.seq}" /> </td>
                    </tr>
                    <tr>
                        <th>内容<span class="hint">*</span></th>
                        <td colspan="3">
                            <textarea style="height:360px;width:95%;" name="content" id="content" placeholder="请输入备注信息">
                                {$affairs.content}
                            </textarea>
                        </td>
                    </tr>
                    <tr style="line-height:20px !important;">
                        <th>附件</th>
                        <td class="attachments" name="attachments" colspan="2">
                            <input name="att1" type="hidden" />
                            <input name="att1_name" type="hidden" />
                            <input name="att2" type="hidden" />
                            <input name="att2_name" type="hidden" />
                            <input name="att3" type="hidden" />
                            <input name="att3_name" type="hidden" />
                        </td>
                        <td>
                            <button onclick="addAttachment();" type="button" style="padding:3px 6px;">添加附件</button>
                            <input type="file" name="upload" class="hidden" />
                            <label style="color:red;">最多上传3个</label>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<script charset="utf-8" src="__JS__/kindeditor/kindeditor-all-min.js"></script>
<script>
    var closeBtnLink = '__IMG__/close.png';
    var editor1 = null;
    KindEditor.ready(function(K) {
        editor1 = K.create('textarea[name="content"]', {
            items: ['fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic',
                'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright',
                'insertorderedlist', 'insertunorderedlist', '|', 'emoticons', 'image', 'link'],
            afterCreate : function() {
                var self = this;
            }
        });
    });
</script>
<script src="__JS__/affairs.js" type="text/javascript" ></script>
<include file="Public:footer" />
